//
//  AddressBookTableViewCell.m
//  AddressBookCoreData
//
//  Created by dllo on 15/11/20.
//  Copyright © 2015年 Dior_3g. All rights reserved.
//

#import "JHCAddressBookTableViewCell.h"
#import <Masonry.h>

#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height

@implementation JHCAddressBookTableViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
        [self createCell];
    }
    return self;
}


- (void)createCell {
    
    self.nameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.nameLabel];
    
    
    self.sexLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.sexLabel];
    
    
    self.numberLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.numberLabel];
    
}

- (void)layoutSubviews {
    
    [super layoutSubviews];
    
//    self.nameLabel.frame = CGRectMake(<#CGFloat x#>, <#CGFloat y#>, <#CGFloat width#>, <#CGFloat height#>);
//    self.nameLabel.layer.borderWidth = 1;
//    
//    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
//        
//        //      设置对称轴, 与上级视图的对称轴相同
//        make.centerY.equalTo(self.view.mas_centerY);
//        
//        make.left.equalTo(self.view).with.offset(15);
//        //      因为view1的右侧, 是相对于view2的左侧, 所以这里要给view2加上mas_left这个属性
//        make.right.equalTo(view2.mas_left).with.offset(- 15);
//        
//        make.height.mas_equalTo(150);
//        make.width.equalTo(view2);
//        
//    }];
//    
//    self.sexLabel.frame = CGRectMake(<#CGFloat x#>, <#CGFloat y#>, <#CGFloat width#>, <#CGFloat height#>);
//    self.sexLabel.layer.borderWidth = 1;
//    
//    self.numberLabel.frame = CGRectMake(WIDTH / 100 * 2, <#CGFloat y#>, <#CGFloat width#>, <#CGFloat height#>);
//    self.numberLabel.layer.borderWidth = 1;
    
}





- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
